﻿using Pay.DTO;
using Pay.TO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.IService {
    public interface ITokenBillService {
        bool CreateTokenBill(UserAudit audit, List<bind_merchant_item> binds);
        PagedResult<token_bill_dto> Gets(TokenBillQuery query);
        PagedResult<token_bill_detial_dto> Gets(TokenBillDetailQuery query);
        /// <summary>
        /// 单个账单分佣明细
        /// </summary>
        /// <param name="id">账单id</param>
        /// <returns></returns>
        List<token_bill_detial_dto> getBillDetails(long id);
        /// <summary>
        /// 账单明细详情
        /// </summary>
        /// <param name="id">账单明细id</param>
        /// <returns></returns>
        token_bill_detial_dto GetBillDetail(long id);
        /// <summary>
        /// 账单总账详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        token_bill_dto GetBill(long id);
        /// <summary>
        /// 确认收益
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool ConfirmUserBill(confirm_user_bill_model model);
        /// <summary>
        /// 系统收益
        /// </summary>
        /// <param name="id">账单详情id</param>
        /// <param name="UserId">操作人</param>
        /// <returns></returns>
        bool SysConfirmUserBill(long id, long UserId);
        /// <summary>
        /// 确认分佣
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool ConfirmBillMaid(confirm_bill_maid_model model);
        /// <summary>
        /// 升级分润账单
        /// </summary>
        /// <param name="merchant_id"></param>
        /// <param name="binds"></param>
        /// <param name="pay_id"></param>
        void CreateTokenBill(long merchant_id, List<bind_merchant_item> binds, long pay_id = 0,BusType busType = BusType.None);
        /// <summary>
        /// 钱包课程收益列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedResult<token_wallet_bill_detail_dto> GetWalletBillDetails(WalletQuery query);
        /// <summary>
        /// 398商品账单解冻
        /// </summary>
        /// <param name="pay_id"></param>
        void UpAccountDeblock(long pay_id);
        /// <summary>
        /// 业绩解冻
        /// </summary>
        /// <param name="pay_id"></param>
        void MallAccountDeBlock(long pay_id);
        /// <summary>
        /// 商城退款业绩收益退回
        /// </summary>
        /// <param name="pay_id"></param>
        void MallRefundAccount(long pay_id);
    }
}
